<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Dem Bones: include/DemBones/DemBonesExt.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="DemBones_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Dem Bones
   &#160;<span id="projectnumber">1.2.0</span>
   </div>
   <div id="projectbrief">Skinning Decomposition Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_dem_bones_ext_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">DemBonesExt.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_dem_bones_ext_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//               Dem Bones - Skinning Decomposition Library                  //</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//         Copyright (c) 2019, Electronic Arts. All rights reserved.         //</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef DEM_BONES_EXT</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define DEM_BONES_EXT</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_dem_bones_8h.html">DemBones.h</a>&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;Eigen/Geometry&gt;</span> </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#ifndef DEM_BONES_MAT_BLOCKS</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_mat_blocks_8h.html">MatBlocks.h</a>&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="_dem_bones_ext_8h.html#a17555af6ed4631ab94d00c90fefb8532">   17</a></span>&#160;<span class="preprocessor">#define DEM_BONES_DEM_BONES_EXT_MAT_BLOCKS_UNDEFINED</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_dem.html">Dem</a></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;{</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> _Scalar, <span class="keyword">class</span> _AniMeshScalar&gt;</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html">   31</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_dem_1_1_dem_bones_ext.html">DemBonesExt</a>: <span class="keyword">public</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones</a>&lt;_Scalar, _AniMeshScalar&gt; {</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">public</span>: </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    EIGEN_MAKE_ALIGNED_OPERATOR_NEW</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a7bc7c59a436c5a0d217adef008bb0eb3">   35</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a>=Eigen::Matrix&lt;_Scalar, Eigen::Dynamic, Eigen::Dynamic&gt;;</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a7da7e93c85500a1a23855d85c5db08c6">   36</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html#ad2a018d01cdb2a44f8ee964ddb4e8278">Matrix4</a>=Eigen::Matrix&lt;_Scalar, 4, 4&gt;;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#af372c94208c01a28f9a57b6377223470">   37</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html#aed480cb1bda1b33f20171f7f847c1b06">Matrix3</a>=Eigen::Matrix&lt;_Scalar, 3, 3&gt;;</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#ae4ea2e0183a87df169cb893c1a699709">   38</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html#aee5cdd95063d2b11d8a461f0e2efa9f9">VectorX</a>=Eigen::Matrix&lt;_Scalar, Eigen::Dynamic, 1&gt;;</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a033b6fd2dcf075cd48ed433f8a33cca1">   39</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html#a0c30c98fb363f888345d86e5a11acd14">Vector4</a>=Eigen::Matrix&lt;_Scalar, 4, 1&gt;;</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#af058734937a4b845b089291d4392f8ef">   40</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html#a9404399e2528175da18fd80d7d4fc4f9">Vector3</a>=Eigen::Matrix&lt;_Scalar, 3, 1&gt;;</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a039349271cd9bd256ba359f0eab2ac7c">   41</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html#aa8ea3a6b166652e954decbf135b3255b">SparseMatrix</a>=Eigen::SparseMatrix&lt;_Scalar&gt;;</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#aedb230a6a7eede0d751355b385e58938">   42</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html#ac6f69fb5e7a91330f21f48ad9f019212">Triplet</a>=Eigen::Triplet&lt;_Scalar&gt;;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nIters</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nInitIters</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nTransIters</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::transAffine</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::transAffineNorm</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nWeightsIters</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nnz</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::weightsSmooth</a>; </div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::weightsSmoothStep</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::weightEps</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nV</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nB</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nS</a>;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::nF</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::fStart</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::subjectID</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::u</a>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::w</a>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::lockW</a>;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::m</a>;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::lockM</a>;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::v</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::fv</a>;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::iter</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;::iterTransformations</a>;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keyword">using</span> <a class="code" href="class_dem_1_1_dem_bones.html">DemBones&lt;_Scalar, _AniMeshScalar&gt;</a><a class="code" href="class_dem_1_1_dem_bones.html#aef1b9e1d0815f32c8f8374376c8d2c22">:: iterWeights</a>;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#aebbc9093e05f8d3a466fe40610f5289d">   74</a></span>&#160;    Eigen::VectorXd <a class="code" href="class_dem_1_1_dem_bones_ext.html#aebbc9093e05f8d3a466fe40610f5289d">fTime</a>;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#afcf732ef4b030e907b7054232cc255f5">   77</a></span>&#160;    std::vector&lt;std::string&gt; <a class="code" href="class_dem_1_1_dem_bones_ext.html#afcf732ef4b030e907b7054232cc255f5">boneName</a>;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">   80</a></span>&#160;    Eigen::VectorXi <a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d">   83</a></span>&#160;    <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a> <a class="code" href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d">bind</a>;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">   86</a></span>&#160;    <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a> <a class="code" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">preMulInv</a>;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a30f4bfbe88493adecae038035e0b33be">   89</a></span>&#160;    Eigen::MatrixXi <a class="code" href="class_dem_1_1_dem_bones_ext.html#a30f4bfbe88493adecae038035e0b33be">rotOrder</a>;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a9a6a2004f16832cd3f97c22789147a8a">   92</a></span>&#160;    <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a> <a class="code" href="class_dem_1_1_dem_bones_ext.html#a9a6a2004f16832cd3f97c22789147a8a">orient</a>;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a92939c0de147f8075754d9cbf66113fc">   95</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_dem_1_1_dem_bones_ext.html#a92939c0de147f8075754d9cbf66113fc">bindUpdate</a>;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a582382217aeefd8d2fb93bcb6aad9875">   99</a></span>&#160;    <a class="code" href="class_dem_1_1_dem_bones_ext.html#a582382217aeefd8d2fb93bcb6aad9875">DemBonesExt</a>(): <a class="code" href="class_dem_1_1_dem_bones_ext.html#a92939c0de147f8075754d9cbf66113fc">bindUpdate</a>(0) {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#a9fd6e95de36adee0d487786315da551f">clear</a>();</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    }</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a9fd6e95de36adee0d487786315da551f">  105</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_dem_1_1_dem_bones_ext.html#a9fd6e95de36adee0d487786315da551f">clear</a>() {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#aebbc9093e05f8d3a466fe40610f5289d">fTime</a>.resize(0);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#afcf732ef4b030e907b7054232cc255f5">boneName</a>.resize(0);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>.resize(0);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d">bind</a>.resize(0, 0);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">preMulInv</a>.resize(0, 0);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#a30f4bfbe88493adecae038035e0b33be">rotOrder</a>.resize(0, 0);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#a9a6a2004f16832cd3f97c22789147a8a">orient</a>.resize(0, 0);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones.html#a18bcd81e4238a4a298c4ee4ca78ae2fb">DemBones&lt;_Scalar, _AniMeshScalar&gt;::clear</a>();</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    }</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="class_dem_1_1_dem_bones_ext.html#a4be2b221fa273518adbd3fa2e2bc86d0">  133</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_dem_1_1_dem_bones_ext.html#a4be2b221fa273518adbd3fa2e2bc86d0">computeRTB</a>(<span class="keywordtype">int</span> s, <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a>&amp; lr, <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a>&amp; lt, <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a>&amp; gb, <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a>&amp; lbr, <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a>&amp; lbt, <span class="keywordtype">bool</span> degreeRot=<span class="keyword">true</span>) {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        computeBind(s, gb);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>.size()==0) {</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#a92939c0de147f8075754d9cbf66113fc">bindUpdate</a>==2) {</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                <span class="keywordtype">int</span> root=computeRoot();</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                <a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>=Eigen::VectorXi::Constant(<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>, root);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;                <a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>(root)=-1;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;            } <span class="keywordflow">else</span> <a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>=Eigen::VectorXi::Constant(<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>, -1);</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        }</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">preMulInv</a>.size()==0) <a class="code" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">preMulInv</a>=MatrixX::Identity(4, 4).replicate(<a class="code" href="class_dem_1_1_dem_bones.html#a913edb0e3273c6b18012c000a0764915">nS</a>, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#a30f4bfbe88493adecae038035e0b33be">rotOrder</a>.size()==0) <a class="code" href="class_dem_1_1_dem_bones_ext.html#a30f4bfbe88493adecae038035e0b33be">rotOrder</a>=Eigen::Vector3i(0, 1, 2).replicate(<a class="code" href="class_dem_1_1_dem_bones.html#a913edb0e3273c6b18012c000a0764915">nS</a>, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#a9a6a2004f16832cd3f97c22789147a8a">orient</a>.size()==0) <a class="code" href="class_dem_1_1_dem_bones_ext.html#a9a6a2004f16832cd3f97c22789147a8a">orient</a>=MatrixX::Zero(3*<a class="code" href="class_dem_1_1_dem_bones.html#a913edb0e3273c6b18012c000a0764915">nS</a>, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordtype">int</span> nFs=<a class="code" href="class_dem_1_1_dem_bones.html#adf3d4f2aa7408bb6a9db540e86fd69c7">fStart</a>(s+1)-<a class="code" href="class_dem_1_1_dem_bones.html#adf3d4f2aa7408bb6a9db540e86fd69c7">fStart</a>(s);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        lr.resize(nFs*3, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        lt.resize(nFs*3, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        lbr.resize(3, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        lbt.resize(3, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">MatrixX</a> lm(4*nFs, 4*<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="preprocessor">        #pragma omp parallel for</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j&lt;<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>; j++) {</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            Eigen::Vector3i ro=<a class="code" href="class_dem_1_1_dem_bones_ext.html#a30f4bfbe88493adecae038035e0b33be">rotOrder</a>.col(j).template segment&lt;3&gt;(s*3);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            <a class="code" href="class_dem_1_1_dem_bones.html#a9404399e2528175da18fd80d7d4fc4f9">Vector3</a> ov=<a class="code" href="class_dem_1_1_dem_bones_ext.html#a9a6a2004f16832cd3f97c22789147a8a">orient</a>.vec3(s, j)*EIGEN_PI/180;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            <a class="code" href="class_dem_1_1_dem_bones.html#aed480cb1bda1b33f20171f7f847c1b06">Matrix3</a> invOM=<a class="code" href="class_dem_1_1_dem_bones_ext.html#af372c94208c01a28f9a57b6377223470">Matrix3</a>(Eigen::AngleAxis&lt;_Scalar&gt;(ov(ro(2)), Vector3::Unit(ro(2))))*</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;                Eigen::AngleAxis&lt;_Scalar&gt;(ov(ro(1)), Vector3::Unit(ro(1)))*</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;                Eigen::AngleAxis&lt;_Scalar&gt;(ov(ro(0)), Vector3::Unit(ro(0)));</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            invOM.transposeInPlace();</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            <a class="code" href="class_dem_1_1_dem_bones.html#ad2a018d01cdb2a44f8ee964ddb4e8278">Matrix4</a> lb;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>(j)==-1) lb=<a class="code" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">preMulInv</a>.blk4(s, j)*gb.blk4(0, j);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;            <span class="keywordflow">else</span> lb=<a class="code" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">preMulInv</a>.blk4(s, j)*gb.blk4(0, <a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>(j)).inverse()*gb.blk4(0, j);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;            <a class="code" href="class_dem_1_1_dem_bones.html#a9404399e2528175da18fd80d7d4fc4f9">Vector3</a> curRot=Vector3::Zero();</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;            toRot(invOM*lb.template topLeftCorner&lt;3, 3&gt;(), curRot, ro);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;            lbr.col(j)=curRot;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            lbt.col(j)=lb.template topRightCorner&lt;3, 1&gt;();</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;            <a class="code" href="class_dem_1_1_dem_bones.html#ad2a018d01cdb2a44f8ee964ddb4e8278">Matrix4</a> lm;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k=0; k&lt;nFs; k++) {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>(j)==-1) lm=<a class="code" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">preMulInv</a>.blk4(s, j)*<a class="code" href="class_dem_1_1_dem_bones.html#a3462ee570b8b809ecff8739000783813">m</a>.blk4(k+<a class="code" href="class_dem_1_1_dem_bones.html#adf3d4f2aa7408bb6a9db540e86fd69c7">fStart</a>(s), j)*gb.blk4(0, j);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;                <span class="keywordflow">else</span> lm=<a class="code" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">preMulInv</a>.blk4(s, j)*(<a class="code" href="class_dem_1_1_dem_bones.html#a3462ee570b8b809ecff8739000783813">m</a>.blk4(k+<a class="code" href="class_dem_1_1_dem_bones.html#adf3d4f2aa7408bb6a9db540e86fd69c7">fStart</a>(s), <a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>(j))*gb.blk4(0, <a class="code" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">parent</a>(j))).inverse()*<a class="code" href="class_dem_1_1_dem_bones.html#a3462ee570b8b809ecff8739000783813">m</a>.blk4(k+<a class="code" href="class_dem_1_1_dem_bones.html#adf3d4f2aa7408bb6a9db540e86fd69c7">fStart</a>(s), j)*gb.blk4(0, j);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                toRot(invOM*lm.template topLeftCorner&lt;3, 3&gt;(), curRot, ro);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                lr.vec3(k, j)=curRot;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                lt.vec3(k, j)=lm.template topRightCorner&lt;3, 1&gt;();</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        }</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="keywordflow">if</span> (degreeRot) {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            lr*=180/EIGEN_PI;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;            lbr*=180/EIGEN_PI;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordtype">void</span> computeCentroids(<span class="keywordtype">int</span> s, <a class="code" href="class_dem_1_1_dem_bones_ext.html#a7bc7c59a436c5a0d217adef008bb0eb3">MatrixX</a>&amp; b) {</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#a7bc7c59a436c5a0d217adef008bb0eb3">MatrixX</a> c=MatrixX::Zero(4, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="class_dem_1_1_dem_bones.html#a277dac86c8474a12eb489bedf98ddee2">nV</a>; i++)</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;            <span class="keywordflow">for</span> (<span class="keyword">typename</span> SparseMatrix::InnerIterator it(<a class="code" href="class_dem_1_1_dem_bones.html#a8fa642adc3a5610f0a391fa5f437a9b3">w</a>, i); it; ++it)</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;                c.col(it.row())+=pow(it.value(), <a class="code" href="class_dem_1_1_dem_bones.html#a3b125934b440ebcebb3ba44acda41366">transAffineNorm</a>)*<a class="code" href="class_dem_1_1_dem_bones.html#aae8731033731fbe34df518e15137724a">u</a>.vec3(s, i).homogeneous();</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j&lt;<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>; j++)</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            <span class="keywordflow">if</span> ((c(3, j)!=0)&amp;&amp;(<a class="code" href="class_dem_1_1_dem_bones.html#a8391d148fee49d4c056b3b62bc1c7c08">lockM</a>(j)==0)) b.transVec(0, j)=c.col(j).template head&lt;3&gt;()/c(3, j);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    }</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    <span class="keywordtype">void</span> computeBind(<span class="keywordtype">int</span> s, <a class="code" href="class_dem_1_1_dem_bones_ext.html#a7bc7c59a436c5a0d217adef008bb0eb3">MatrixX</a>&amp; b) {</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d">bind</a>.size()==0) {</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            <a class="code" href="class_dem_1_1_dem_bones.html#a8391d148fee49d4c056b3b62bc1c7c08">lockM</a>=Eigen::VectorXi::Zero(<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            <a class="code" href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d">bind</a>.resize(<a class="code" href="class_dem_1_1_dem_bones.html#a913edb0e3273c6b18012c000a0764915">nS</a>*4, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>*4);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k=0; k&lt;<a class="code" href="class_dem_1_1_dem_bones.html#a913edb0e3273c6b18012c000a0764915">nS</a>; k++) {</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;                b=MatrixX::Identity(4, 4).replicate(1, <a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;                computeCentroids(k, b);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;                <a class="code" href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d">bind</a>.block(4*s, 0, 4, 4*<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>)=b;</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;            }</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        }</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        b=<a class="code" href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d">bind</a>.block(4*s, 0, 4, 4*<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_dem_1_1_dem_bones_ext.html#a92939c0de147f8075754d9cbf66113fc">bindUpdate</a>&gt;=1) computeCentroids(s, b);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    }</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160; </div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <span class="keywordtype">int</span> computeRoot() {</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#ae4ea2e0183a87df169cb893c1a699709">VectorX</a> err(<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>);</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="preprocessor">        #pragma omp parallel for</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j&lt;<a class="code" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">nB</a>; j++) {</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            <span class="keywordtype">double</span> ej=0;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="class_dem_1_1_dem_bones.html#a277dac86c8474a12eb489bedf98ddee2">nV</a>; i++)</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k=0; k&lt;<a class="code" href="class_dem_1_1_dem_bones.html#aa9cf74a32230ec9c61096a58cdc555bf">nF</a>; k++) ej+=(<a class="code" href="class_dem_1_1_dem_bones.html#a3462ee570b8b809ecff8739000783813">m</a>.rotMat(k, j)*<a class="code" href="class_dem_1_1_dem_bones.html#aae8731033731fbe34df518e15137724a">u</a>.vec3(<a class="code" href="class_dem_1_1_dem_bones.html#ac99a3d810ab4fc1286e9677ce5c322b0">subjectID</a>(k), i)+<a class="code" href="class_dem_1_1_dem_bones.html#a3462ee570b8b809ecff8739000783813">m</a>.transVec(k, j)-<a class="code" href="class_dem_1_1_dem_bones.html#a276046cc5a2a13802762d65c17ec67fb">v</a>.vec3(k, i).template cast&lt;_Scalar&gt;()).squaredNorm();</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            err(j)=ej;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        }</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <span class="keywordtype">int</span> rj;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        err.minCoeff(&amp;rj);</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="keywordflow">return</span> rj;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    }</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160; </div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    <span class="keywordtype">void</span> toRot(<span class="keyword">const</span> <a class="code" href="class_dem_1_1_dem_bones_ext.html#af372c94208c01a28f9a57b6377223470">Matrix3</a>&amp; rMat, <a class="code" href="class_dem_1_1_dem_bones_ext.html#af058734937a4b845b089291d4392f8ef">Vector3</a>&amp; curRot, <span class="keyword">const</span> Eigen::Vector3i&amp; ro, _Scalar eps=_Scalar(1e-10)) {</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#af058734937a4b845b089291d4392f8ef">Vector3</a> r0=rMat.eulerAngles(ro(2), ro(1), ro(0)).reverse();</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        _Scalar gMin=(r0-curRot).squaredNorm();</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#af058734937a4b845b089291d4392f8ef">Vector3</a> rMin=r0;</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#af058734937a4b845b089291d4392f8ef">Vector3</a> r;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        <a class="code" href="class_dem_1_1_dem_bones_ext.html#af372c94208c01a28f9a57b6377223470">Matrix3</a> tmpMat;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> fx=-1; fx&lt;=1; fx+=2)</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            <span class="keywordflow">for</span> (_Scalar sx=-2*EIGEN_PI; sx&lt;2.1*EIGEN_PI; sx+=EIGEN_PI) {</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;                r(0)=fx*r0(0)+sx;</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> fy=-1; fy&lt;=1; fy+=2)</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                    <span class="keywordflow">for</span> (_Scalar sy=-2*EIGEN_PI; sy&lt;2.1*EIGEN_PI; sy+=EIGEN_PI) {</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                        r(1)=fy*r0(1)+sy;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> fz=-1; fz&lt;=1; fz+=2)</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                            <span class="keywordflow">for</span> (_Scalar sz=-2*EIGEN_PI; sz&lt;2.1*EIGEN_PI; sz+=EIGEN_PI) {</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                                r(2)=fz*r0(2)+sz;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                                tmpMat=<a class="code" href="class_dem_1_1_dem_bones_ext.html#af372c94208c01a28f9a57b6377223470">Matrix3</a>(Eigen::AngleAxis&lt;_Scalar&gt;(r(ro(2)), Vector3::Unit(ro(2))))*</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;                                    Eigen::AngleAxis&lt;_Scalar&gt;(r(ro(1)), Vector3::Unit(ro(1)))*</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;                                    Eigen::AngleAxis&lt;_Scalar&gt;(r(ro(0)), Vector3::Unit(ro(0)));</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                                <span class="keywordflow">if</span> ((tmpMat-rMat).squaredNorm()&lt;eps) {</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                                    _Scalar tmp=(r-curRot).squaredNorm();</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;                                    <span class="keywordflow">if</span> (tmp&lt;gMin) {</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;                                        gMin=tmp;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;                                        rMin=r;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                                    }</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                                }</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                            }</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;                    }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;            }</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        curRot=rMin;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    }</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;};</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160; </div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;}</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160; </div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;<span class="preprocessor">#ifdef DEM_BONES_DEM_BONES_EXT_MAT_BLOCKS_UNDEFINED</span></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="preprocessor">#undef blk4</span></div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<span class="preprocessor">#undef rotMat</span></div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;<span class="preprocessor">#undef transVec</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="preprocessor">#undef vec3</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;<span class="preprocessor">#undef DEM_BONES_MAT_BLOCKS</span></div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<span class="preprocessor">#undef rotMatFromEuler</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160; </div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a3462ee570b8b809ecff8739000783813"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a3462ee570b8b809ecff8739000783813">Dem::DemBones::m</a></div><div class="ttdeci">MatrixX m</div><div class="ttdoc">Bone transformations, size = [4*nF*4, 4*nB], m.blk4(k, j) is the 4*4 relative transformation matrix o...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00139">DemBones.h:139</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_ae4ea2e0183a87df169cb893c1a699709"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#ae4ea2e0183a87df169cb893c1a699709">Dem::DemBonesExt::VectorX</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, Eigen::Dynamic, 1 &gt; VectorX</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00038">DemBonesExt.h:38</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a582382217aeefd8d2fb93bcb6aad9875"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a582382217aeefd8d2fb93bcb6aad9875">Dem::DemBonesExt::DemBonesExt</a></div><div class="ttdeci">DemBonesExt()</div><div class="ttdoc">Constructor and setting default parameters.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00099">DemBonesExt.h:99</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html">Dem::DemBonesExt</a></div><div class="ttdoc">Extended class to handle hierarchical skeleton with local rotations/translations and bind matrices.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00031">DemBonesExt.h:31</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a277dac86c8474a12eb489bedf98ddee2"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a277dac86c8474a12eb489bedf98ddee2">Dem::DemBones::nV</a></div><div class="ttdeci">int nV</div><div class="ttdoc">Number of vertices, typically indexed by i.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00114">DemBones.h:114</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a7bc7c59a436c5a0d217adef008bb0eb3"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a7bc7c59a436c5a0d217adef008bb0eb3">Dem::DemBonesExt::MatrixX</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, Eigen::Dynamic, Eigen::Dynamic &gt; MatrixX</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00035">DemBonesExt.h:35</a></div></div>
<div class="ttc" id="anamespace_dem_html"><div class="ttname"><a href="namespace_dem.html">Dem</a></div><div class="ttdef"><b>Definition:</b> <a href="_convex_l_s_8h_source.html#l00015">ConvexLS.h:15</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a3b125934b440ebcebb3ba44acda41366"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a3b125934b440ebcebb3ba44acda41366">Dem::DemBones::transAffineNorm</a></div><div class="ttdeci">_Scalar transAffineNorm</div><div class="ttdoc">[parameter] p-norm for bone translations affinity soft constraint, default = 4.0</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00090">DemBones.h:90</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a0c30c98fb363f888345d86e5a11acd14"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a0c30c98fb363f888345d86e5a11acd14">Dem::DemBones::Vector4</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, 4, 1 &gt; Vector4</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00074">DemBones.h:74</a></div></div>
<div class="ttc" id="a_dem_bones_8h_html"><div class="ttname"><a href="_dem_bones_8h.html">DemBones.h</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_aae8731033731fbe34df518e15137724a"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#aae8731033731fbe34df518e15137724a">Dem::DemBones::u</a></div><div class="ttdeci">MatrixX u</div><div class="ttdoc">Geometry at the rest poses, size = [3*nS, nV], u.col(i).segment(3*s, 3) is the rest pose of vertex i ...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00128">DemBones.h:128</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_aef1b9e1d0815f32c8f8374376c8d2c22"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#aef1b9e1d0815f32c8f8374376c8d2c22">Dem::DemBones::iterWeights</a></div><div class="ttdeci">const int &amp; iterWeights</div><div class="ttdoc">[zero indexed, read only] Current weights update iteration number that can be used for callback funct...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00157">DemBones.h:157</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a4be2b221fa273518adbd3fa2e2bc86d0"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a4be2b221fa273518adbd3fa2e2bc86d0">Dem::DemBonesExt::computeRTB</a></div><div class="ttdeci">void computeRTB(int s, MatrixX &amp;lr, MatrixX &amp;lt, MatrixX &amp;gb, MatrixX &amp;lbr, MatrixX &amp;lbt, bool degreeRot=true)</div><div class="ttdoc">Local rotations, translations and global bind matrices of a subject.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00133">DemBonesExt.h:133</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_aa8ea3a6b166652e954decbf135b3255b"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#aa8ea3a6b166652e954decbf135b3255b">Dem::DemBones::SparseMatrix</a></div><div class="ttdeci">Eigen::SparseMatrix&lt; _Scalar &gt; SparseMatrix</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00076">DemBones.h:76</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_ac99a3d810ab4fc1286e9677ce5c322b0"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#ac99a3d810ab4fc1286e9677ce5c322b0">Dem::DemBones::subjectID</a></div><div class="ttdeci">Eigen::VectorXi subjectID</div><div class="ttdoc">Subject index of the frame, size = nF, subjectID(k)=s, where fStart(s) &lt;= k &lt; fStart(s+1)</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00125">DemBones.h:125</a></div></div>
<div class="ttc" id="a_mat_blocks_8h_html"><div class="ttname"><a href="_mat_blocks_8h.html">MatBlocks.h</a></div><div class="ttdoc">Defines some macros to access sub-blocks of packing transformation/position matrices for convenience.</div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_adf3d4f2aa7408bb6a9db540e86fd69c7"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#adf3d4f2aa7408bb6a9db540e86fd69c7">Dem::DemBones::fStart</a></div><div class="ttdeci">Eigen::VectorXi fStart</div><div class="ttdoc">Start frame indices, size = nS+1, fStart(s), fStart(s+1) are data frames for subject s.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00123">DemBones.h:123</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a3785152d056860bc55febcad64837ef3"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3">Dem::DemBonesExt::preMulInv</a></div><div class="ttdeci">MatrixX preMulInv</div><div class="ttdoc">Inverse pre-multiplication matrices, [size] = [4*nS, 4*nB], preMulInv.block(4*s, 4*j,...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00086">DemBonesExt.h:86</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a9a6a2004f16832cd3f97c22789147a8a"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a9a6a2004f16832cd3f97c22789147a8a">Dem::DemBonesExt::orient</a></div><div class="ttdeci">MatrixX orient</div><div class="ttdoc">Orientations of bones, [size] = [3*nS, nB], orient.col(j).segment&lt;3&gt;(3*s) is the(rx,...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00092">DemBonesExt.h:92</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a9fd6e95de36adee0d487786315da551f"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a9fd6e95de36adee0d487786315da551f">Dem::DemBonesExt::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Clear all data.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00105">DemBonesExt.h:105</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_af372c94208c01a28f9a57b6377223470"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#af372c94208c01a28f9a57b6377223470">Dem::DemBonesExt::Matrix3</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, 3, 3 &gt; Matrix3</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00037">DemBonesExt.h:37</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_aebbc9093e05f8d3a466fe40610f5289d"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#aebbc9093e05f8d3a466fe40610f5289d">Dem::DemBonesExt::fTime</a></div><div class="ttdeci">Eigen::VectorXd fTime</div><div class="ttdoc">Timestamps for bone transformations m, [size] = nS, fTime(k) is the timestamp of frame k.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00074">DemBonesExt.h:74</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a913edb0e3273c6b18012c000a0764915"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a913edb0e3273c6b18012c000a0764915">Dem::DemBones::nS</a></div><div class="ttdeci">int nS</div><div class="ttdoc">Number of subjects, typically indexed by s.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00118">DemBones.h:118</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_aee5cdd95063d2b11d8a461f0e2efa9f9"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#aee5cdd95063d2b11d8a461f0e2efa9f9">Dem::DemBones::VectorX</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, Eigen::Dynamic, 1 &gt; VectorX</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00073">DemBones.h:73</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_af058734937a4b845b089291d4392f8ef"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#af058734937a4b845b089291d4392f8ef">Dem::DemBonesExt::Vector3</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, 3, 1 &gt; Vector3</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00040">DemBonesExt.h:40</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a85422fd18d48c40485f05d77b1c4cf4d"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d">Dem::DemBonesExt::bind</a></div><div class="ttdeci">MatrixX bind</div><div class="ttdoc">Original bind pre-matrix, [size] = [4*nS, 4*nB], bind.block(4*s, 4*j, 4, 4) is the global bind matrix...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00083">DemBonesExt.h:83</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_ad740868b3bc6cdf34e6e2ec5f35e24d7"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7">Dem::DemBonesExt::parent</a></div><div class="ttdeci">Eigen::VectorXi parent</div><div class="ttdoc">Parent bone index, [size] = nB, parent(j) is the index of parent bone of j, parent(j) = -1 if j has n...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00080">DemBonesExt.h:80</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_aa9cf74a32230ec9c61096a58cdc555bf"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#aa9cf74a32230ec9c61096a58cdc555bf">Dem::DemBones::nF</a></div><div class="ttdeci">int nF</div><div class="ttdoc">Number of total frames, typically indexed by k, nF = fStart(nS)</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00120">DemBones.h:120</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a92939c0de147f8075754d9cbf66113fc"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a92939c0de147f8075754d9cbf66113fc">Dem::DemBonesExt::bindUpdate</a></div><div class="ttdeci">int bindUpdate</div><div class="ttdoc">Bind transformation update, 0=keep original, 1=set translations to p-norm centroids (using transAffin...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00095">DemBonesExt.h:95</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a9404399e2528175da18fd80d7d4fc4f9"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a9404399e2528175da18fd80d7d4fc4f9">Dem::DemBones::Vector3</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, 3, 1 &gt; Vector3</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00075">DemBones.h:75</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_ac6f69fb5e7a91330f21f48ad9f019212"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#ac6f69fb5e7a91330f21f48ad9f019212">Dem::DemBones::Triplet</a></div><div class="ttdeci">Eigen::Triplet&lt; _Scalar &gt; Triplet</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00077">DemBones.h:77</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a8fa642adc3a5610f0a391fa5f437a9b3"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a8fa642adc3a5610f0a391fa5f437a9b3">Dem::DemBones::w</a></div><div class="ttdeci">SparseMatrix w</div><div class="ttdoc">Skinning weights, size = [nB, nV], w.col(i) are the skinning weights of vertex i, w(j,...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00131">DemBones.h:131</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a5e4b99c4a233b477116204f9f1fae9cd"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a5e4b99c4a233b477116204f9f1fae9cd">Dem::DemBones::MatrixX</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, Eigen::Dynamic, Eigen::Dynamic &gt; MatrixX</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00070">DemBones.h:70</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_aa0b51ddfe06be09fdf3c74a00f5dd867"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867">Dem::DemBones::nB</a></div><div class="ttdeci">int nB</div><div class="ttdoc">Number of bones, typically indexed by j.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00116">DemBones.h:116</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_ad2a018d01cdb2a44f8ee964ddb4e8278"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#ad2a018d01cdb2a44f8ee964ddb4e8278">Dem::DemBones::Matrix4</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, 4, 4 &gt; Matrix4</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00071">DemBones.h:71</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_afcf732ef4b030e907b7054232cc255f5"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#afcf732ef4b030e907b7054232cc255f5">Dem::DemBonesExt::boneName</a></div><div class="ttdeci">std::vector&lt; std::string &gt; boneName</div><div class="ttdoc">Name of bones, [size] = nB, boneName(j) is the name bone of j.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00077">DemBonesExt.h:77</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a276046cc5a2a13802762d65c17ec67fb"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a276046cc5a2a13802762d65c17ec67fb">Dem::DemBones::v</a></div><div class="ttdeci">Eigen::Matrix&lt; _AniMeshScalar, Eigen::Dynamic, Eigen::Dynamic &gt; v</div><div class="ttdoc">Animated mesh sequence, size = [3*nF, nV], v.col(i).segment(3*k, 3) is the position of vertex i at fr...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00145">DemBones.h:145</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html"><div class="ttname"><a href="class_dem_1_1_dem_bones.html">Dem::DemBones</a></div><div class="ttdoc">Smooth skinning decomposition with rigid bones and sparse, convex weights.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00066">DemBones.h:66</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_ext_html_a30f4bfbe88493adecae038035e0b33be"><div class="ttname"><a href="class_dem_1_1_dem_bones_ext.html#a30f4bfbe88493adecae038035e0b33be">Dem::DemBonesExt::rotOrder</a></div><div class="ttdeci">Eigen::MatrixXi rotOrder</div><div class="ttdoc">Rotation order, [size] = [3*nS, nB], rotOrder.col(j).segment&lt;3&gt;(3*s) is the rotation order of bone j ...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_ext_8h_source.html#l00089">DemBonesExt.h:89</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a8391d148fee49d4c056b3b62bc1c7c08"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a8391d148fee49d4c056b3b62bc1c7c08">Dem::DemBones::lockM</a></div><div class="ttdeci">Eigen::VectorXi lockM</div><div class="ttdoc">Bone transformation lock control, size = nB, lockM(j) is the amount of input transformations will be ...</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00142">DemBones.h:142</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_aed480cb1bda1b33f20171f7f847c1b06"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#aed480cb1bda1b33f20171f7f847c1b06">Dem::DemBones::Matrix3</a></div><div class="ttdeci">Eigen::Matrix&lt; _Scalar, 3, 3 &gt; Matrix3</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00072">DemBones.h:72</a></div></div>
<div class="ttc" id="aclass_dem_1_1_dem_bones_html_a18bcd81e4238a4a298c4ee4ca78ae2fb"><div class="ttname"><a href="class_dem_1_1_dem_bones.html#a18bcd81e4238a4a298c4ee4ca78ae2fb">Dem::DemBones::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Clear all data.</div><div class="ttdef"><b>Definition:</b> <a href="_dem_bones_8h_source.html#l00161">DemBones.h:161</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_4df80cdcb6e25b788688d708f51a1dfc.html">DemBones</a></li><li class="navelem"><a class="el" href="_dem_bones_ext_8h.html">DemBonesExt.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
  </ul>
</div>
</body>
</html>
